// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   TransparentFrame.java

package presenter;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.media.Player;
import javax.media.Renderer;
import javax.media.control.FrameGrabbingControl;
import javax.swing.*;

public class TransparentFrame extends JPanel
    implements ActionListener
{

    public TransparentFrame(JPanel jp)
    {
        setIgnoreRepaint(true);
        t = new Timer(40, this);
        t.start();
        this.jp = jp;
        setBackground(new Color(0, 0, 0, 0));
    }

    public void paintComponent(Graphics g)
    {
        super.paintComponent(g);
        BufferedImage bi = new BufferedImage(jp.getWidth(), jp.getHeight(), 1);
        Graphics gr = bi.getGraphics();
        jp.paintAll(gr);
        background = bi;
        if(background == null)
            g.drawString("hello", 100, 100);
    }

    public void actionPerformed(ActionEvent e)
    {
        repaint();
    }

    Timer t;
    Image background;
    Player pl;
    Renderer r;
    FrameGrabbingControl fgc;
    JPanel jp;
    JLayeredPane jlp;
}
